<template>
  <div class="main-container">
    <!-- 侧边导航 -->
    <a-menu 
      mode="inline" 
      class="side-menu"
      :style="{ 
        borderRight: '5px solid #f0f0f0',
        height: '100vh'
      }"
    >
      <a-menu-item key="user">
        <router-link to="/manage/user">用户管理</router-link>
      </a-menu-item>
      <a-menu-item key="api">
        <router-link to="/manage/interfaceInfo">接口管理</router-link>
      </a-menu-item>
    </a-menu>

    <!-- 欢迎界面 -->
    <div class="content" v-if="$route.path === '/manage'">
      <a-card class="welcome-card" :bordered="false">
        <template #title>
          <h2 style="color: #1890ff">欢迎来到管理控制台</h2>
        </template>
        <div class="welcome-content">
          <p>🎉 您可以使用本系统进行以下操作：</p>
          <ul>
            <li>👤 用户账号管理</li>
            <li>🔌 接口信息维护</li>
            <li>📊 数据分析统计</li>
          </ul>
          <p>💡 提示：通过左侧菜单导航至具体功能模块</p>
        </div>
      </a-card>
    </div>

    <router-view v-else class="content"></router-view>
  </div>
</template>

<script setup>

</script>

<style scoped>
.main-container { 
  display: flex; 
  min-height: 100vh;
}

.side-menu {
  width: 200px;
  left: 0;
  top: 0;
  bottom: 0;
  background: #dceaff;
  z-index: 1;
}

.content {
  flex: 1;
  padding: 24px; /* 与侧边栏宽度一致 */
  background: #f5f7fa;
  min-height: 100vh;
}

.welcome-card {
  max-width: 800px;
  margin: 40px auto;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  
  :deep(.ant-card-head) {
    border-bottom: 1px solid #e8e8e8;
  }
}

.welcome-content {
  padding: 16px;
  line-height: 1.8;
  
  p {
    color: #666;
    margin: 12px 0;
  }
  
  ul {
    padding-left: 24px;
    margin: 16px 0;
    
    li {
      color: #444;
      padding: 6px 0;
    }
  }
}
</style>